<?php

/* user.html */
class __TwigTemplate_8395ef2d9f6b25dc7d3576ff1648c6be extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        $this->parent = $this->env->loadTemplate("layout.html");

        $this->blocks = array(
            'title' => array($this, 'block_title'),
            'content' => array($this, 'block_content'),
        );
    }

    protected function doGetParent(array $context)
    {
        return "layout.html";
    }

    protected function doDisplay(array $context, array $blocks = array())
    {
        $this->parent->display($context, array_merge($this->blocks, $blocks));
    }

    // line 3
    public function block_title($context, array $blocks = array())
    {
        echo "User Management";
    }

    // line 6
    public function block_content($context, array $blocks = array())
    {
        // line 7
        echo "<ul class=\"nav nav-tabs custom-tab\">
    <li class=\"active\"><a href=\"#\" data-toggle=\"tab\"><i class=\"icon-list\"></i><span>Users</span></a></li>
    <li><a href=\"";
        // line 9
        if (isset($context["base_url"])) { $_base_url_ = $context["base_url"]; } else { $_base_url_ = null; }
        echo twig_escape_filter($this->env, $_base_url_, "html", null, true);
        echo "admin/user.php?action=add\" data-toggle=\"tab\"><i class=\"icon-user\"></i><span>Add User</span></a></li>
</ul>
<div class=\"user-list\">
    <h2>User Management</h2>
    <table class=\"table table-striped table-bordered table-condensed\">
        <thead>
            <tr>
                <th>Username</th>
                <th>Email</th>
                <th>Name</th>
                <th>Action</th>
            </tr>

        </thead>
        <tbody>
            ";
        // line 24
        if (isset($context["users"])) { $_users_ = $context["users"]; } else { $_users_ = null; }
        $context['_parent'] = (array) $context;
        $context['_seq'] = twig_ensure_traversable($_users_);
        foreach ($context['_seq'] as $context["_key"] => $context["user"]) {
            // line 25
            echo "            <tr>
                <td>";
            // line 26
            if (isset($context["user"])) { $_user_ = $context["user"]; } else { $_user_ = null; }
            echo twig_escape_filter($this->env, $this->getAttribute($_user_, "username"));
            echo "</td>
                <td>";
            // line 27
            if (isset($context["user"])) { $_user_ = $context["user"]; } else { $_user_ = null; }
            echo twig_escape_filter($this->env, $this->getAttribute($_user_, "email"), "html", null, true);
            echo "</td>
                <td>";
            // line 28
            if (isset($context["user"])) { $_user_ = $context["user"]; } else { $_user_ = null; }
            echo twig_escape_filter($this->env, $this->getAttribute($_user_, "first_name"), "html", null, true);
            echo " ";
            if (isset($context["user"])) { $_user_ = $context["user"]; } else { $_user_ = null; }
            echo twig_escape_filter($this->env, $this->getAttribute($_user_, "last_name"), "html", null, true);
            echo "</td>
                <td>

                    <a href=\"";
            // line 31
            if (isset($context["base_url"])) { $_base_url_ = $context["base_url"]; } else { $_base_url_ = null; }
            echo twig_escape_filter($this->env, $_base_url_, "html", null, true);
            echo "admin/user.php?action=edit&user_id=";
            if (isset($context["user"])) { $_user_ = $context["user"]; } else { $_user_ = null; }
            echo twig_escape_filter($this->env, $this->getAttribute($_user_, "id"), "html", null, true);
            echo "\" rel=\"tooltip\" title=\"Edit\" ><i class=\" icon-pencil\"></i></a>
                    <a href=\"";
            // line 32
            if (isset($context["base_url"])) { $_base_url_ = $context["base_url"]; } else { $_base_url_ = null; }
            echo twig_escape_filter($this->env, $_base_url_, "html", null, true);
            echo "admin/user.php?action=view&user_id=";
            if (isset($context["user"])) { $_user_ = $context["user"]; } else { $_user_ = null; }
            echo twig_escape_filter($this->env, $this->getAttribute($_user_, "id"), "html", null, true);
            echo "\" rel=\"tooltip\" title=\"View\"><i class=\"icon-eye-open\"></i></a>
                    <a href=\"";
            // line 33
            if (isset($context["base_url"])) { $_base_url_ = $context["base_url"]; } else { $_base_url_ = null; }
            echo twig_escape_filter($this->env, $_base_url_, "html", null, true);
            echo "admin/user.php?action=delete&user_id=";
            if (isset($context["user"])) { $_user_ = $context["user"]; } else { $_user_ = null; }
            echo twig_escape_filter($this->env, $this->getAttribute($_user_, "id"), "html", null, true);
            echo "\" rel=\"tooltip\" title=\"Delete\" class=\"delete\"><i class=\"icon-remove\"></i></a>
                </td>
            </tr>  
            ";
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['user'], $context['_parent'], $context['loop']);
        $context = array_merge($_parent, array_intersect_key($context, $_parent));
        // line 37
        echo "        </tbody>
    </table>
</div>
<div id=\"modalDelete\" class=\"modal hide\">
    <div class=\"modal-header\">
        <button type=\"button\" class=\"close\" data-dismiss=\"modal\">x</button>
        <h3>Confirm delete user</h3>
    </div>
    <div class=\"modal-body\">
        <p>Do you want to delete user?</p>
    </div>
    <div class=\"modal-footer\">
        <a href=\"#\" class=\"btn\" data-dismiss=\"modal\">No</a>
        <a href=\"#\" id=\"deleteLink\" class=\"btn btn-primary\">Yes</a>
    </div>
</div>
<script src=\"";
        // line 53
        if (isset($context["base_url"])) { $_base_url_ = $context["base_url"]; } else { $_base_url_ = null; }
        echo twig_escape_filter($this->env, $_base_url_, "html", null, true);
        echo "/admin/js/bootstrap-modal.js\"></script>
<script>
    \$(document).ready(function(){
        \$('a[rel=\"tooltip\"]').tooltip();
        
        //Delete user
        \$('.delete').click(function(e){
            var deleteURL = \$(this).attr('href');
            \$('#deleteLink').attr('href', deleteURL);
            
            \$('#modalDelete').modal({
                keyboard: false
                
            });
            e.preventDefault();
        })
        
    })
</script>
";
    }

    public function getTemplateName()
    {
        return "user.html";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  135 => 53,  117 => 37,  103 => 33,  95 => 32,  87 => 31,  77 => 28,  72 => 27,  67 => 26,  64 => 25,  59 => 24,  40 => 9,  36 => 7,  33 => 6,  27 => 3,);
    }
}
